home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / gfx / fu1_62.lha / fu / Rexx / anim3.rexx < prev    next >
OS/2 REXX Batch file  |  1995-03-25  |  1KB  |  68 lines

  1. /* FU Arexxtester */
  2.  
  3. options results
  4.  
  5. ADDRESS REXX_FU
  6.  
  7. say 'FU-ArexxAnim';say;
  8.  
  9. SetIter '100';
  10. if RC~=0 then call AppError('SetIter',RC);
  11.  
  12. xs1=-2.0;ys1=-2.5;xs2=4.0;ys2=2.5
  13. xe1=1.8934;ye1=-1.7549;xe2=2.1944;ye2=-1.5196
  14.  
  15. frames=50
  16. x1step=(xe1-xs1)/frames
  17. x2step=(xe2-xs2)/frames
  18. y1step=(ye1-ys1)/frames
  19. y2step=(ye2-ys2)/frames
  20.  
  21. say 'Steps      : ' x1step y1step x2step y2step;
  22.  
  23. do i=0 to frames
  24.     x1step=(xe1-xs1)/10
  25.     x2step=(xe2-xs2)/10
  26.     y1step=(ye1-ys1)/10
  27.     y2step=(ye2-ys2)/10
  28.  
  29.     name='xh3:frames/MAGNETZOOM.'right(i,3,'0');
  30.     say 'Working on : ' name;
  31.     say 'Zoom       : ' xs1 ys1 xs2 ys2;
  32.  
  33.     SetZoom xs1 ys1 xs2 ys2;
  34.     if RC~=0 then call AppError('SetZoom',RC);
  35.  
  36.     RenderPicture;
  37.     if RC~=0 then call AppError('RenderPicture',RC);
  38.  
  39.     SavePicture name '2'
  40.     if RC~=0 then call AppError('SavePicture',RC);
  41.  
  42.     xs1=xs1+x1step;
  43.     xs2=xs2+x2step;
  44.     ys1=ys1+y1step;
  45.     ys2=ys2+y2step;
  46. end
  47.  
  48. ActivateFU;
  49. if RC~=0 then call AppError('ActivateFU',RC);
  50.  
  51. ExitFU;
  52. if RC~=0 then call AppError('ExitFU',RC);
  53.  
  54. exit
  55.  
  56. AppError:procedure
  57.     cmd=arg(1);
  58.     ret=arg(2);
  59.     say 'Application Error';say;
  60.     say 'Command 'cmd' failed with Returncode 'ret;
  61.     select
  62.         when ret='1' then say '    => unknown command';
  63.         when ret='2' then say '    => unknown parameter';
  64.         otherwise say '    => unknown returncode';
  65.     end
  66.     say;
  67. return
  68.